package com.gxks.lhs.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gxks.lhs.entity.Ad;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * <p>
 * 主页轮播图 服务类
 * </p>
 *
 * @author LuoHaisong
 * @since 2024-03-29
 */
public interface IAdService extends IService<Ad> {
    boolean saveAd(Ad ad);

    boolean deleteAd(Long adId);

    Ad queryAdById(Long adId);

    /**
     * 查询全部正常状态的广告
     */
    Page<Ad> queryAllAdForUser();

    Page<Ad> queryAllAdForAdmin(Integer current, Integer size);

    boolean offAd(Long adId);

    boolean onAd(Long adId);

    Page<Ad> query(Ad ad, Integer current, Integer size);


}
